/**
 */
package ram_av.provider;


import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.common.util.ResourceLocator;

import org.eclipse.emf.ecore.EStructuralFeature;

import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;

import ram_av.Advice;
import ram_av.Ram_avFactory;
import ram_av.Ram_avPackage;

/**
 * This is the item provider adapter for a {@link ram_av.Advice} object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public class AdviceItemProvider
  extends ItemProviderAdapter
  implements
    IEditingDomainItemProvider,
    IStructuredItemContentProvider,
    ITreeItemContentProvider,
    IItemLabelProvider,
    IItemPropertySource
{
  /**
   * This constructs an instance from a factory and a notifier.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public AdviceItemProvider(AdapterFactory adapterFactory)
  {
    super(adapterFactory);
  }

  /**
   * This returns the property descriptors for the adapted class.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
  {
    if (itemPropertyDescriptors == null)
    {
      super.getPropertyDescriptors(object);

    }
    return itemPropertyDescriptors;
  }

  /**
   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
  {
    if (childrenFeatures == null)
    {
      super.getChildrenFeatures(object);
      childrenFeatures.add(Ram_avPackage.Literals.ADVICE__CHILDREN);
    }
    return childrenFeatures;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EStructuralFeature getChildFeature(Object object, Object child)
  {
    // Check the type of the specified child object and return the proper feature to use for
    // adding (see {@link AddCommand}) it as a child.

    return super.getChildFeature(object, child);
  }

  /**
   * This returns Advice.gif.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object getImage(Object object)
  {
    return overlayImage(object, getResourceLocator().getImage("full/obj16/Advice"));
  }

  /**
   * This returns the label text for the adapted class.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public String getText(Object object)
  {
    return getString("_UI_Advice_type");
  }

  /**
   * This handles model notifications by calling {@link #updateChildren} to update any cached
   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void notifyChanged(Notification notification)
  {
    updateChildren(notification);

    switch (notification.getFeatureID(Advice.class))
    {
      case Ram_avPackage.ADVICE__CHILDREN:
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
        return;
    }
    super.notifyChanged(notification);
  }

  /**
   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
   * that can be created under this object.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
  {
    super.collectNewChildDescriptors(newChildDescriptors, object);

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createNamedElement()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createAspect()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createMappableElement()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createStructuralView()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createType()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createObjectType()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createClassifier()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createClass()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createTypedElement()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createStructuralFeature()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createProperty()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createAssociationEnd()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createAssociation()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createInstantiation()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createMapping()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createOperation()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createAttribute()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createParameter()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createPrimitiveType()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createRVoid()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createRBoolean()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createRInt()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createRChar()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createRString()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createRAny()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createREnum()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createREnumLiteral()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createAbstractMessageView()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createMessageView()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createMessageViewReference()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createFragmentContainer()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createInteraction()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createAspectMessageView()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createLifeline()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createMessage()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createMessageEnd()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createInteractionFragment()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createOccurrenceSpecification()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createMessageOccurrenceSpecification()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createDestructionOccurrenceSpecification()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createCombinedFragment()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createOriginalBehaviorExecution()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createExecutionStatement()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createInteractionOperand()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createValueSpecification()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createStructuralFeatureValue()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createParameterValueMapping()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createParameterValue()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createOpaqueExpression()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createLiteralSpecification()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createLiteralString()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createLiteralInteger()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createRCollection()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createRSet()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createRList()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createLayout()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.create(Ram_avPackage.Literals.CONTAINER_MAP)));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.create(Ram_avPackage.Literals.ELEMENT_MAP)));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createLayoutElement()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createImplementationClass()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createTemporaryProperty()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createReference()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createGate()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createLiteralBoolean()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createClassifierMapping()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createAttributeMapping()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createOperationMapping()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createParameterMapping()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createStateView()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createStateMachine()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createTransition()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createState()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createAdvice()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createGlobalScope()));

    newChildDescriptors.add
      (createChildParameter
        (Ram_avPackage.Literals.ADVICE__CHILDREN,
         Ram_avFactory.eINSTANCE.createPerJoinPointScope()));
  }

  /**
   * Return the resource locator for this item provider's resources.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public ResourceLocator getResourceLocator()
  {
    return RAM_adviceEditPlugin.INSTANCE;
  }

}
